using UnityEngine;

public class SPR_CopyPosition : MonoBehaviour
{
	[Header("-- Variables --")]
	[SerializeField]
	private Transform Target;

	[SerializeField]
	private Vector3 Offset;

	[SerializeField]
	private bool Enabled = true;

	[Header("-- Player Specific --")]
	[SerializeField]
	private bool TargetPlayer;

	private void LateUpdate()
	{
		//IL_005d: Unknown result type (might be due to invalid IL or missing references)
		//IL_0063: Unknown result type (might be due to invalid IL or missing references)
		//IL_0068: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0030: Unknown result type (might be due to invalid IL or missing references)
		//IL_0035: Unknown result type (might be due to invalid IL or missing references)
		if (Enabled)
		{
			if (!TargetPlayer && (Object)(object)Target != (Object)null)
			{
				((Component)this).transform.position = Target.position + Offset;
			}
			else if ((Object)(object)PlayerManager.Instance != (Object)null)
			{
				((Component)this).transform.position = ((Component)PlayerManager.Instance).transform.position + Offset;
			}
		}
	}
}
